import { S } from '../../s';
import { PSAjaxControlImpl } from '../psajax-control-impl';
import { IPSCustomControl } from './ipscustom-control';
import { IPSSysPFPlugin } from '../../res/ipssys-pfplugin';

export class PSCustomControlImpl
  extends PSAjaxControlImpl
  implements IPSCustomControl
{
  get customTag(): string {
    return this.M.customTag;
  }

  get customTag2(): string {
    return this.M.customTag2;
  }

  protected pssyspfplugin: IPSSysPFPlugin;
  getPSSysPFPlugin(): IPSSysPFPlugin | null {
    return (
      this.pssyspfplugin ||
      (this.pssyspfplugin = this.fillObjectModel(
        S._27c,
        this.M.getPSSysPFPlugin,
        S._2a7,
      ) as IPSSysPFPlugin)
    );
  }

  get predefinedType(): string {
    return this.M.predefinedType;
  }
  get cls(): string {
    return 'PSCustomControlImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._218) return true;
    return super.instanceof(cls);
  }
}
